package com.cb.domain.model.order;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * Insurance Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 * 保险
 */
@Entity
@Table(name="insurance")
public class Insurance implements Serializable {

    protected Long id;
	protected String insuranceNo;
	protected String bxFlight;
	protected Long bxStatus;
	protected com.cb.domain.model.order.Passenger passenger;
	protected Date createTime;

	
	@Column(name="createTime")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "passengerId", unique = false, nullable = true, insertable = true, updatable = true)
	public com.cb.domain.model.order.Passenger getPassenger () {
		return passenger;
	}	
	
	public void setPassenger (com.cb.domain.model.order.Passenger in_passenger) {
		this.passenger = in_passenger;
	}
    

	/**
	 * 	 * @return Long
     * @hibernate.id column="id" type="java.lang.Long" generator-class="native"
	 */
	
	@Id     
    @GeneratedValue(generator="Id_Generator")
    @GenericGenerator(name="Id_Generator", strategy="com.cb.common.util.IdGenerator")
	public Long getId() {
		return this.id;
	}
	
	/**
	 * Set the id
	 */	
	public void setId(Long aValue) {
		this.id = aValue;
	}	

	/**
	 * 保险单号	 * @return String
	 * @hibernate.property column="insuranceNo" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "insuranceNo")	
	public String getInsuranceNo() {
		return this.insuranceNo;
	}
	
	/**
	 * Set the insuranceNo
	 */	
	public void setInsuranceNo(String aValue) {
		this.insuranceNo = aValue;
	}	

	/**
	 * 该保单所属航段	 * @return String
	 * @hibernate.property column="bxFlight" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	
	@Column(name = "bxFlight")	
	public String getBxFlight() {
		return this.bxFlight;
	}
	
	/**
	 * Set the bxFlight
	 */	
	public void setBxFlight(String aValue) {
		this.bxFlight = aValue;
	}	

	/**
	 * 待支付
            出保中
            已出保险
            保单取消等待退款
            退保成功等待退款
            退款完成
            已拆分
            	 * @return Long
	 * @hibernate.property column="bxStatus" type="java.lang.Long" length="19" not-null="false" unique="false"
	 */
	
	@Column(name = "bxStatus")	
	public Long getBxStatus() {
		return this.bxStatus;
	}
	
	/**
	 * Set the bxStatus
	 */	
	public void setBxStatus(Long aValue) {
		this.bxStatus = aValue;
	}	

}